<template>
  <div>
      <el-card 
          class="box-patriarchcard" 
          v-for="it in data"
          :key="it.stuId">

          <div slot="header" class="clearfix">
            <span style='font-size:18px;'>我的家长</span>
          </div>

          <ul class='patriarchcard_tinfo'>
                <li>
                    <span class='title'>联系人姓名：</span>
                    <span class='value'>{{it.parentDetailDoList[0].parentName}}</span>
                </li>
                <li>
                    <span class='title'>联系人电话：</span>
                    <span class='value'>{{it.parentDetailDoList[0].cellPhone}}</span>
                </li>
                <li>
                    <span class='title'>关系：</span>
                    <span class='value'>{{it.parentDetailDoList[0].stuTarget}}</span>
                </li>
            </ul>
      </el-card>
        
  </div>
</template>

<script> 

export default {
    data() {
        return {
            data: [],
        }
    },
    
    methods: {
        getList() {
            this.axios({
                method: 'get',
                url: this.url + 'web/student/ParentDetail/studentParentList',
                headers: { 'token': this.TOKEN }
            }).then(res => {
                log(res)
                if(res.data.code == 200) {
                    this.data = res.data.data;
                    log(this.data)
                } else {
                  this.$message({
                      message: res.data.message,
                      type: 'error'
                  })
                }
            })
            
        },
    },
    mounted() {
        this.getList();
    }
}

 

</script>

<style>
.box-patriarchcard{width:316px;overflow: hidden;float: left;margin:14px 14px 0 0 ;}
.patriarchcard_tinfo{width:100%;list-style: none;margin: 0;padding: 0;margin-left: 7px;}
.patriarchcard_tinfo>li{overflow: hidden;line-height:32px;font-size: 16px;}
.patriarchcard_tinfo>li>.title{width:120px;display:block;float: left;}
.patriarchcard_tinfo>li>.value{display:block;float: left;width:113px}
.el-card__body{padding:15px ;}
</style>

